// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.FBAAddress;
import com.fowo.api.model.fbaaddress.FBAAddressItemVo;
import com.fowo.api.model.fbaaddress.FBAAddressSearchParamPo;
import com.fowo.api.model.fbaaddress.FBAAddressVo;
import com.fowo.api.model.fbato.address.FBAToAddressItemVo;
import com.fowo.api.model.fbato.address.FBAToAddressSearchParamPo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface FBAAddressMapper extends BaseMapper<FBAAddress> {
  Page<FBAAddressItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") FBAAddressSearchParamPo search
  );
  List<OptionItem<FBAAddressItemVo>> searchOptions(
    @Param("search") FBAAddressSearchParamPo search
  );
  List<FBAAddressItemVo> search(
    @Param("search") FBAAddressSearchParamPo search
  );
  Date searchLastUpdateTime(@Param("search") FBAAddressSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") FBAAddressSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") FBAAddressSearchParamPo search);
  Long getIdByAlias(@Param("alias") String alias);

  List<Long> getIdsByAlias(@Param("list") List<String> list);

  String getAliasById(@Param("id") Long id);

  List<Map<String, Object>> getAliasByIds(@Param("ids") List<Long> ids);
  FBAAddressVo selectVoById(@Param("id") Long id);
  /**
   * FBA发货地址簿
   */
  List<FBAAddressItemVo> fBAFromAddressView(
    @Param("search") FBAAddressSearchParamPo search
  );

  /**
   * 获取FBA发货地址簿编号列表
   */
  List<Long> fBAFromAddressViewIds(
    @Param("search") FBAAddressSearchParamPo search
  );

  /**
   * 获取FBA发货地址簿的总数
   */
  Long fBAFromAddressViewCount(@Param("search") FBAAddressSearchParamPo search);

  /**
   * FBA发货地址簿分页
   */
  Page<FBAAddressItemVo> fBAFromAddressViewPage(
    @Param("page") Page page,
    @Param("search") FBAAddressSearchParamPo search
  );
  Date fBAFromAddressViewLastUpdateTime(
    @Param("search") FBAAddressSearchParamPo search
  );
  /**
   * 配送地址
   */
  List<FBAToAddressItemVo> fBAToAddressView(
    @Param("search") FBAToAddressSearchParamPo search
  );

  /**
   * 配送地址分页
   */
  Page<FBAToAddressItemVo> fBAToAddressViewPage(
    @Param("page") Page page,
    @Param("search") FBAToAddressSearchParamPo search
  );
  /**
   * 配送地址最后更新时间
   */
  Date fBAToAddressViewLastUpdateTime(
    @Param("search") FBAToAddressSearchParamPo search
  );
}
